class NewsList {
  String? stat;
  String? page;
  String? pageSize;
  List<NewsItem>? data;

  NewsList({
    this.stat, 
    this.page, 
    this.pageSize, 
    this.data
  });

  NewsList.fromJson(Map<String, dynamic> json) {
    stat = json['stat'];
    page = json['page'];
    pageSize = json['pageSize'];
    if (json['data'] != null) {
      data = <NewsItem>[];
      json['data'].forEach((v) {
        data!.add(NewsItem.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final target = <String, dynamic>{};
    target['stat'] = stat;
    target['page'] = page;
    target['pageSize'] = pageSize;
    if (data != null) {
      target['data'] = data!.map((v) => v.toJson()).toList();
    }
    return target;
  }
}

class NewsItem {
  String? uniquekey;
  String? title;
  String? date;
  String? category;
  String? authorName;
  String? url;
  String? thumbnailPicS;
  String? thumbnailPicS02;
  String? thumbnailPicS03;
  String? content;

  NewsItem({
    this.uniquekey,
    this.title,
    this.date,
    this.category,
    this.authorName,
    this.url,
    this.thumbnailPicS,
    this.thumbnailPicS02,
    this.thumbnailPicS03,
    this.content
  });

  NewsItem.fromJson(Map<String, dynamic> json) {
    uniquekey = json['uniquekey'];
    title = json['title'];
    date = json['date'];
    category = json['category'];
    authorName = json['author_name'];
    url = json['url'];
    thumbnailPicS = json['thumbnail_pic_s'];
    thumbnailPicS02 = json['thumbnail_pic_s02'];
    thumbnailPicS03 = json['thumbnail_pic_s03'];
    content = json['content'];
  }

  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['uniquekey'] = uniquekey;
    data['title'] = title;
    data['date'] = date;
    data['category'] = category;
    data['author_name'] = authorName;
    data['url'] = url;
    data['thumbnail_pic_s'] = thumbnailPicS;
    data['thumbnail_pic_s02'] = thumbnailPicS02;
    data['thumbnail_pic_s03'] = thumbnailPicS03;
    data['content'] = content;
    return data;
  }
}